package com.example.testspringes.modul;

/**
 * @Description: //TODO
 * @ProjectName: testspringes
 * @Package: com.example.testspringes.modul
 * @Author: FX
 * @CreateDate: 2019/2/20 18:03
 * @Version: 1.0
 * Copyright: Copyright (c) 2019
 */
public class Singleton {
    private static Singleton instance=null;
    private Singleton(){

    }
    public static Singleton getInstance(){
        if(instance==null){
            synchronized(Singleton.class){
                if(instance==null){
                    instance=new Singleton();
                }
            }
        }
        return instance;
    }
}
